
import pub

class Car:
    def __init__(self, ID):
        self.id = ID
        self.pos = 0
        self.visible = False
        self.startTime = -1
        self.speed = 10
        self.color = 'yellow'

    def run(self):
        if self.pos < pub.road_length:
            self.pos += self.speed
            print( self.id, " is running; current position: ", self.pos)
        else:
            print(self.id, " arrived.")

